<?php
$menuLs=
array("course"=>
				array("t"=>"Cursos",	
					  "u"=>url_for('curses/index'),
					  "child"=>array(
							"ls"=>array("t"=>"Lista","u"=>url_for('curses/index')),
							"nw"=>array("t"=>"Nuevo","u"=>url_for('curses/new'))	
					   )
					
			   ),
	  "publications"=>
				array("t"=>"Publicaciones",	
					  "u"=>url_for('publications/index'),
					  "child"=>array(
							"ls"=>array("t"=>"Lista","u"=>url_for('publications/index')),
							"nw"=>array("t"=>"Nuevo","u"=>url_for('publications/new'))	
					   )
					
			   ),
	  "teacher"=>
				array("t"=>"Profesores",	
					  "u"=>url_for('teacher/index'),
					  "child"=>array(
							"ls"=>array("t"=>"Lista","u"=>url_for('teacher/index')),
							"nw"=>array("t"=>"Nuevo","u"=>url_for('teacher/new'))	
					   )
					
			   ),
	   "sections"=>
				array("t"=>"Secciones",	
					  "u"=>url_for('sections/index'),
					  "child"=>array(
							"ls"=>array("t"=>"Lista","u"=>url_for('sections/index')),
							"nw"=>array("t"=>"Nuevo","u"=>url_for('sections/new'))	
					   )
					
			   ),
	   "mail"=>
				array("t"=>"Correos",	
					  "u"=>url_for('mail/index'),
					  "child"=>array(
							"ls"=>array("t"=>"Lista","u"=>url_for('mail/index'))	
					   )
					
			   ),
        "file"=>
				array("t"=>"Archivos",
					  "u"=>url_for('fileupload/index'),
					  "child"=>array(
							"ls"=>array("t"=>"Lista","u"=>url_for('fileupload/index')),
                            "nw"=>array("t"=>"Nuevo","u"=>url_for('fileupload/new'))
					   )
					
			   ),
        "banner"=>
				array("t"=>"Banners",
					  "u"=>url_for('banner/index'),
					  "child"=>array(
							"ls"=>array("t"=>"Lista","u"=>url_for('banner/index')),
                            "ls"=>array("t"=>"Nuevo","u"=>url_for('banner/new')),
					   )
					
			   ),
        "promotion"=>
				array("t"=>"Promociones",
					  "u"=>url_for('promotion/index'),
					  "child"=>array(
							"ls"=>array("t"=>"Lista","u"=>url_for('promotion/index')),
                            "nw"=>array("t"=>"Nueva","u"=>url_for('promotion/new')),
					   )
					
			   )
	)
?>
<?php 

$selectedMenu=get_slot("ms","none.none");
$selectedMenu.=strpos(".",$selectedMenu)?".none":"";
list($mainSelected,$childSelected)= explode(".",$selectedMenu);
?>
<?php foreach($menuLs as $key=>$menu){ ?>
<li <?php echo ($key==$mainSelected)?"class='selected'":""?>>
	<a href="<?php echo $menu["u"] ?>"><?php echo __($menu["t"]) ?></a>
	<?php if(isset($menu["child"])){?>
	<ul>
		<?php foreach($menu["child"] as $skey=>$smenu){?>
		<li <?php echo ($skey==$childSelected)?"class='selected'":""?>><a href="<?php echo $smenu["u"]?>"><?php echo __($smenu["t"])?></a></li>
		<?php }?>
	</ul>
	<?php }?>
</li>
<?php }?>